/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hype;

/**
 *
 * @author Luca
 */
public class Flow {
    String rate;
    String function;
    boolean increment;

    
    public Flow(String rate, String function, boolean increment) {
        this.rate = rate;
        this.function = function;
        this.increment = increment;
    }

    
    public FlowTransition getTransition(String influence, int state, String variable, String guard) {
        FlowTransition t;
        String reset = variable + (increment ? " += " : " -= ") + rate;
        t = new FlowTransition(influence + "_" + state,guard,reset,function);
        return t;
    }
    
    
}
